package com.dao.impl;

import java.util.List;

import org.hibernate.Session;

import com.bean.Type;
import com.dao.TypeDao;

public class TypeDaoImpl implements TypeDao {

	@Override
	public List<Type> getAll() {
		Session session = null;
		try {
			session = HibernateUtil.getSession();
			return session.createQuery("from Type").list();
		} finally {
			if (session != null)
				session.close();
		}
	}
}
